<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<jsp:useBean id="utilities" class="masterpiece.util.Utilities" scope="session" />    
<%@ page import="java.sql.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Find Article to Update</title>
<link rel="stylesheet" type="text/css" href="css/default.css" />
</head>
<body>
<%@ include file="top_menu.jsp" %>
  <h1>Click on Article ID to Edit</h1>
  <table>
  <thead>
  <tr>
    <td>Article ID</td>
    <td>Headline</td>
  </tr>
  </thead>
  <tbody>
<%
	String url;        
	ResultSet rs = utilities.getUpdateList();
	while (rs.next())
	{
	  //build url for each hour field
	  url = "updatearticle1.jsp?articleid="+rs.getString(1);
		
	  out.println("<tr>");
	  out.println("<td><a href=\"" + url +"\">" + rs.getString(1) + "</a></td>");
	  out.println("<td>" + rs.getClob(2).getSubString(1l,(int)rs.getClob(2).length()) + "</td>");
	  out.println("</tr>");	  
	} //end while
%> 
  </tbody>
</table>
</body>
</html>